package com.rwind.schema.config;

import org.springframework.boot.diagnostics.FailureAnalysis;
import org.springframework.boot.diagnostics.FailureAnalyzer;
import org.springframework.stereotype.Component;
@Component
public class CustomFailureAnalyzer01 implements FailureAnalyzer {
    @Override
    public FailureAnalysis analyze(Throwable failure) {
        failure.printStackTrace();
        String description = "CustomException occurred: " + failure.getMessage();
        String action = "Check the implementation of the CustomException handler for appropriate error handling.";
        return new FailureAnalysis(description, action, failure);
    }
}